package com.music.api;

import com.music.util.JsonResultUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

//name：指定FeignClient的名称，如果项目使用了Ribbon，name属性会作为微服务的名称，用于服务发现
@FeignClient(name = "cloud-sms") //配置cloud-integral 服务名
public interface SmsApi {

	@RequestMapping("/sms/send")
	public JsonResultUtil send(@RequestBody String phone);


	/**
	 * 发送QQ验证码
	 * @param qqNumber
	 * @return
	 */
	@RequestMapping("/sms/sendEmail")
	public JsonResultUtil sendEmail(@RequestBody String qqNumber);

	/**
	 * 测试控制层
	 * @param phone
	 * @return
	 */
	@RequestMapping("/sms/test/send")
	public JsonResultUtil sendTest(@RequestBody String phone);
}
